package org.shilong.MContext.Json;

import org.shilong.MInterface.Json.JSonInterface;

/**
 * Json上下文
 * @author Administrator
 *
 */
public class JSonContext {

	private static JSonInterface JI = null;

	public final static String TYPE_REGISTER = "";

	public final static String TYPE_GET_UID = "org.shilong.MImpl.Json.weibo.getuid.GetUidImpl";

	public final static String TYPE_GET_USER_INFO = "org.shilong.MImpl.Json.login.GetUserInfoImpl";

	public final static String TYPE_GET_BUSINESS_CARD ="org.shilong.MImpl.Json.businesscard.GetBusinessCardJsonImpl";

	public final static String TYPE_GET_PARIES = "org.shilong.MImpl.Json.party.GetPariesJsonImpl";

	public final static String TYPE_GET_PARIES_CREATED_BY_ME = "org.shilong.MImpl.Json.party.GetParieCreatedByMeJsonImpl";
	
	public final static String TYPE_GET_PARIES_ME_TAKE_PART_IN_ME = "org.shilong.MImpl.Json.party.GetPariesWhichMePartInJsonImpl";

	/*json 获取我的聚会*/
	public final static String TYPE_GET_MY_PARIES = "org.shilong.MImpl.Json.party.GetParieCreatedByMeJsonImpl";
	
	/*获取我微博好友*/
	public final static String TYPE_QUERY_WEIBO_FRIENDS = "org.shilong.MImpl.Json.friend.QueryWeiboFriend4JsonImpl";
	
	
	public static JSonInterface createInstance( String type ){

		JI = null; 

		try {
			JI = (JSonInterface)Class.forName(type).newInstance();
		} catch (InstantiationException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (IllegalAccessException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		} catch (ClassNotFoundException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		return JI;
	}

}
